<?php $this->pageTitle=Yii::app()->name . ' - '.AdminModule::t("Profile");
$this->breadcrumbs=array(
	AdminModule::t("Profile"),
);
?>
<div class="admin_table">
<h1><?php echo AdminModule::t('Your profile'); ?></h1>
<?php echo $this->renderPartial('menu'); ?>

<?php if(Yii::app()->user->hasFlash('profileMessage')): ?>
<div class="success">
<?php echo Yii::app()->user->getFlash('profileMessage'); ?>
</div>
<?php endif; ?>

<div class="link">
<?php echo CHtml::link('Edit Profile',ApplicationConfig::getURL("admin", "profile", "edit"),array('class'=>'search-button')); ?>
</div>
<table class="dataGrid admin_profile" width="100%">
<?php if ($model->role_id=="2"){?>
<tr>
	<th class="label"><?php echo CHtml::encode($modelVendor->getAttributeLabel('vendor_name')); ?>
</th>
    <td><?php echo $modelVendor->vendor_name; ?>
</td>
</tr>

<?php 
	if (!empty($modelVendor->vendor_logo_file))
	{?>
		<img src="<?php echo ApplicationConfig::getImageUrl('VENDOR-IMAGES', array('file_name'=>$modelVendor->vendor_logo_file))?>" width="100px" height="80px">
	<?php }
}?>
<tr>
	<th class="label" width="11%"><?php echo CHtml::encode($model->getAttributeLabel('user_name')); ?>
</th>
    <td><?php echo CHtml::encode($model->user_name); ?>
</td>
</tr>

<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('first_name')); ?>
</th>
    <td><?php echo CHtml::encode($model->first_name); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('last_name')); ?>
</th>
    <td><?php echo CHtml::encode($model->last_name); ?>
</td>
</tr>

<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('emailID')); ?>
</th>
    <td><?php echo CHtml::encode($model->emailID); ?>
</td>
</tr>
<?php if ($model->role_id=="2"){?>
<tr>
	<th class="label"><?php echo CHtml::encode($modelVendor->getAttributeLabel('vendor_address')); ?>
</th>
    <td><?php echo $modelVendor->vendor_address; ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($modelVendor->getAttributeLabel('vendor_cityID')); ?>
</th>
    <td><?php echo City::model()->getModel("BY-ID",array('id'=>$modelVendor->vendor_cityID))->city_name; ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($modelVendor->getAttributeLabel('vendor_stateID')); ?>
</th>
    <td><?php echo State::model()->getModel("BY-ID", array('id'=>$modelVendor->vendor_stateID))->state_name; ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($modelVendor->getAttributeLabel('vendor_type')); ?>
</th>
    <td><?php echo ApplicationConfig::app()->params['vendor_params']['type'][$modelVendor->vendor_type]; ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($modelVendor->getAttributeLabel('subscription_email')); ?>
</th>
    <td><?php echo $modelVendor->subscription_email; ?>
</td>
</tr>
<?php }?>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('created')); ?>
</th>
    <td><?php echo $model->created; ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('lastvisit')); ?>
</th>
    <td><?php echo $model->lastvisit; ?>
</td>
</tr>

</table>
</div>